sgi/dyncfg: add dts files to enable support for dynamic config
authorChandni Cherukuri <[email protected]>
Thu, 10 May 2018 04:46:42 +0000 (10:16 +0530)
committerChandni Cherukuri <[email protected]>
Fri, 15 Jun 2018 04:47:11 +0000 (10:17 +0530)
Remove the existing method of populating the platform id in arg2 of
BL33 which is no longer needed with dynamic configuration feature
enabled as the BL33 will get this information directly via the config
files. Add the tb_fw_config and hw_config dts files.

Change-Id: I3c93fec2aedf9ef1f774a5f0969d2d024e47ed2c
Signed-off-by: Chandni Cherukuri <[email protected]>
plat/arm/css/sgi/fdts/sgi575.dts [new file with mode: 0644]
plat/arm/css/sgi/fdts/sgi575_tb_fw_config.dts [new file with mode: 0644]
plat/arm/css/sgi/sgi-common.mk
plat/arm/css/sgi/sgi_bl31_setup.c

diff --git a/plat/arm/css/sgi/fdts/sgi575.dts b/plat/arm/css/sgi/fdts/sgi575.dts
new file mode 100644 (file)
index 0000000..be9920c
--- /dev/null
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/dts-v1/;
+/ {
+       /* compatible string */
+       compatible = "arm,sgi575";
+};
diff --git a/plat/arm/css/sgi/fdts/sgi575_tb_fw_config.dts b/plat/arm/css/sgi/fdts/sgi575_tb_fw_config.dts
new file mode 100644 (file)
index 0000000..0bb0a94
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/dts-v1/;
+
+/ {
+       /* Platform Config */
+       compatible = "arm,tb_fw";
+       hw_config_addr = <0x0 0xFEF00000>;
+       hw_config_max_size = <0x0100000>;
+};
index f6ef95a03b45371797f7f07e32bb0a69ea3dab04..d27cafeecf4e5d3cdb468e7141a7d8352394afcf 100644 (file)
@@ -39,6 +39,19 @@ BL31_SOURCES         +=      ${ENT_CPU_SOURCES}                      \
                                ${CSS_ENT_BASE}/sgi_topology.c  \
                                ${CSS_ENT_BASE}/sgi_plat_config.c
 
+# Add the FDT_SOURCES and options for Dynamic Config
+FDT_SOURCES            +=      ${CSS_ENT_BASE}/fdts/${PLAT}_tb_fw_config.dts
+TB_FW_CONFIG           :=      ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
+
+# Add the TB_FW_CONFIG to FIP and specify the same to certtool
+$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config))
+
+FDT_SOURCES            +=      ${CSS_ENT_BASE}/fdts/${PLAT}.dts
+HW_CONFIG              :=      ${BUILD_PLAT}/fdts/${PLAT}.dtb
+
+# Add the HW_CONFIG to FIP and specify the same to certtool
+$(eval $(call TOOL_ADD_PAYLOAD,${HW_CONFIG},--hw-config))
+
 $(eval $(call add_define,SGI_PLAT))
 
 override CSS_LOAD_SCP_IMAGES   :=      0
index 0928b83b7676db05cff5bd662829392ce00e53e6..20908463f4429531733024e5bcbb7864bef77232 100644 (file)
 void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
                                u_register_t arg2, u_register_t arg3)
 {
-       uint32_t plat_version;
-       bl_params_node_t *bl_params;
-
-       bl_params = ((bl_params_t *)arg0)->head;
-
        /* Initialize the platform configuration structure */
        plat_config_init();
 
-       while (bl_params) {
-               if (bl_params->image_id == BL33_IMAGE_ID) {
-                       plat_version = mmio_read_32(SSC_VERSION);
-                       bl_params->ep_info->args.arg2 = plat_version;
-                       break;
-               }
-
-               bl_params = bl_params->next_params_info;
-       }
-
        arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);
 }